I am trying to generate a coverage-summary.json file using jest but I noticed something new with it...
total now shows a fifth property called branchesTrue. This didn't happen before and I can't pinpoint what version of jest it started writing this property when generating the report.
Looking into the node module called istanbul-lib-coverage and under the file file-coverage.js on line 304 I can see a comment saying that the branch truthiness can be optionally enabled... I suppose it could also mean that this should have been disabled by default or be optionally disabled.
It is not much of a huge problem but I just wanted to know how I can not show this when generating the coverage report without deleting it manually or commenting out this particular line of code in the node_modules directory.
I take this to be fairly new as well since the a comment under node_modules/istanbul-lib-coverage/lib/coverage-summary.js on line 40 says that it should only be four properties:
"CoverageSummary provides a summary of code coverage . It exposes 4 properties, lines, statements, branches, and functions. Each of these properties is an object that has 4 keys total, covered, skipped and pct. pct is a percentage number (0-100)."
before:
"total": {
"lines": { "total": 3, "covered": 3, "skipped": 0, "pct": 100 },
"statements": { "total": 3, "covered": 3, "skipped": 0, "pct": 100 },
"functions": { "total": 1, "covered": 1, "skipped": 0, "pct": 100 },
"branches": { "total": 0, "covered": 0, "skipped": 0, "pct": 100 }
}
now:
"total": {
"lines": { "total": 3, "covered": 3, "skipped": 0, "pct": 100 },
"statements": { "total": 3, "covered": 3, "skipped": 0, "pct": 100 },
"functions": { "total": 1, "covered": 1, "skipped": 0, "pct": 100 },
"branches": { "total": 0, "covered": 0, "skipped": 0, "pct": 100 },
"branchesTrue": { "total": 0, "covered": 0, "skipped": 0, "pct": "Unknown" }
}
Any help is much appreciated...